package com.eric.domain.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class UserVO implements Serializable {
    private static final long serialVersionUID = 1L;
    private Integer id;

    @NotBlank(message = "登录名不能为空！")
    @Pattern(regexp = "^[A-Za-z]\\S{3,14}$", message = "the login name is wrong")
    private String loginName;

    @NotBlank(message = "密码不能为空！")
   @Pattern(regexp = "^(?=.*[A-Z])(?=.*[!@#$%^&*])[^0-9\\s][A-Za-z0-9!@#$%^&*]{7,15}$", message = "password is wrong")
    private String password;

    private String realName;

    private String createTime;

    private String updateTime;

    private String description;
}
